#include <iostream>
using namespace std;

#include <unistd.h>
#include <sys/types.h>
#include <stdlib.h>

int main()
{
  cout << "-------------------------------------" << endl;
  cout << "当前进程正在运行，pid: " << getpid() << " ppid: " << getppid() << endl;
  cout << "查看环境变量表" << endl;
  cout << "HI = " << (getenv("HI") ? getenv("HI") : "NULL") << endl;
  cout << "PATH = " << (getenv("PATH") ? getenv("PATH") : "NULL") << endl;
  cout << "-------------------------------------" << endl;
  //sleep(3);
  return 0;
}
